Python | Merging nested lists
Given two nested lists, ‘lst1’ and ‘lst2’, write a Python program to create a new nested list ‘lst3’ out of the two given nested lists, so that the new nested list consist common intersections of both lists as well as the non-intersecting elements....
read more
Python – Reform K digit elements
Given the Python list, reform the element to have K digits in a single element....
read more
Python – Minimum identical consecutive Subarray
Sometimes, while working with Python lists or in competitive programming setup, we can come across a subproblem in which we need to get an element that has the minimum consecutive occurrence. The knowledge of solution to it can be of great help and can be employed whenever required. Let’s discuss a certain way in which this task can be performed....
read more
Python – Sort given list of strings by part the numeric part of string
In Python, you can neatly arrange a list of words with numbers by using special methods for sorting. Just look at the numbers in each word, and use sorting techniques that pay attention to these numbers. This helps to put the words in order based on their numerical parts in a way that fits the list perfectly....
read more
Memory Efficient Python List Creation in Case of Generators
We have the task of writing memory-efficient Python list creation in the case of Generators and printing the result. In this article, we will demonstrate memory-efficient Python list creation using Generators....
read more
Python program to get all subsets having sum x
We are given a list of n numbers and a number x, the task is to write a python program to find out all possible subsets of the list such that their sum is x....
read more
Python – Filter rows with required elements
Given a Matrix, filter rows with required elements from other list....
read more
Python program to remove rows with duplicate element in Matrix
Given Matrix, remove all rows which have duplicate elements in them....
read more
Python – List Elements Grouping in Matrix
Given a Matrix, for groups according to list elements, i.e each group should contain all elements from List....
read more
Python – Check if List is K increasing
Given a List, check if the next element is always x + K than current(x)....
read more
Python – Custom length tuples from String
Given a String, extract tuple list, with each tuple being of custom length, delimited using comma....
read more
Python – Constant Multiplication to Nth Column
Many times, while working with records, we can have a problem in which we need to change the value of tuple elements. This is a common problem while working with tuples. Let’s discuss certain ways in which K can be multiplied to Nth element of tuple in list....
read more